package Code;

//需求：数字解密
public class Test7 {
    public static void main(String[] args) {
        int number = 8346;
        int a = 1983;

        System.out.println(decode(number));
    }

    public static int decode(int number) {
        int num = 0;
        while (number > 0) {
            num *= 10;
            int ge = number % 10;
            if (ge<5){
                ge = ge + 5;
            }else {
                ge = ge -5;
            }
            num += ge;
            number /= 10;
        }
        return num;
    }
}
